home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 6 / Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso / 033a / cal14s23.zip / STOUPPER.INC < prev   
Text File  |  1988-12-01  |  1KB  |  38 lines

  1.  
  2. (*--------------------------------------------------------
  3.  *   map string to upper case (tpas 4.0)
  4.  *
  5.  *   (C) 1988 Samuel H. Smith (rev. 12-01-88)
  6.  *
  7.  *)
  8.  
  9. {$F+} procedure stoupper(var st: string); {$F-}
  10. begin
  11.  
  12.    Inline(
  13.      $C4/$7E/$06/           {   les di,[bp]6         ;es:di -> st[0]}
  14.      $26/                   {   es:}
  15.      $8A/$0D/               {   mov cl,[di]          ;cl = length}
  16.      $FE/$C1/               {   inc cl}
  17.  
  18.                             {next:}
  19.      $47/                   {   inc di}
  20.      $FE/$C9/               {   dec cl}
  21.      $74/$12/               {   jz ends}
  22.  
  23.      $26/                   {   es:}
  24.      $8A/$05/               {   mov al,[di]}
  25.      $3C/$61/               {   cmp al,'a'}
  26.      $72/$F4/               {   jb next}
  27.      $3C/$7A/               {   cmp al,'z'}
  28.      $77/$F0/               {   ja next}
  29.  
  30.      $2C/$20/               {   sub al,' '}
  31.      $26/                   {   es:}
  32.      $88/$05/               {   mov [di],al}
  33.      $EB/$E9);              {   jmp next}
  34.  
  35.                             {ends:}
  36. end;
  37.  
  38.